<?
$r = "../";
require_once($r."_engine/header_nocache.php");

include "profile_process.php";

require_once($r."_engine/c_countries.php");
require_once($r."_inc/text.php");

$p = "profile";
include $r."_header.php";
?>

<? 
check_and_show_error(@$status == UPDATE_PROFILE_INCORRECT_PASSWORD,		$g_text_incorrect_old_password);
check_and_show_error(@$status == UPDATE_PROFILE_INCORRECT_PASSWORD2,	$g_text_incorrect_password2);
?>


<form action="<?=$PHP_SELF?>" method="post">
<input type="Hidden" name="do_update" value="1">

<table cellspacing="5" cellpadding="0" style="margin-left: 5;">
<tr>
	<td colspan="2" class="tdH">General</td>
</tr>
<tr>
	<td><span class="text">Your Name:</span></td>
	<td><span class="textStd"><input type="Text" name="f_first_name" value="<?=htmlspecialchars(@$account->data["first_name"])?>" style="width:230" 
		class="input2" class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'"></span></td>
</tr>
<tr>
	<td><span class="text">Your Last Name:</span></td>
	<td><span class="textStd"><input type="Text" name="f_last_name" value="<?=htmlspecialchars(@$account->data["last_name"])?>" style="width:230" 
		class="input2" class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'"></span></td>
</tr>
<tr>
	<td><span class="text">Your Email:</span></td>
	<td><span class="textStd"><input type="Text" name="f_email" value="<?=htmlspecialchars(@$account->data["email"])?>" style="width:230" 
		class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'"></span></td>
</tr>


<tr><td colspan="2">&nbsp;</td></tr>
<tr>
	<td colspan="2" class="tdH">Contact Details</td>
</tr>
<tr>
	<td><span class="text">Country:</td>
	<td><span class="textStd"><select name="f_user_country" class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'" style="width:230">
		<option value="">Select...</options>
		<? html_options_from_list($g_countries->GetList(), @$account->data["user_country"]); ?>
		</select>
	</td>
</tr>
<tr>
	<td><span class="text">Street Address1:</td>
	<td><span class="textStd"><input type="Text" name="f_user_addr1" value="<?=htmlspecialchars(@$account->data["user_addr1"])?>"
			class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'" style="width:230">
	</td>
</tr>
<tr>
	<td><span class="text">Street Address2:</td>
	<td><span class="textStd"><input type="Text" name="f_user_addr2" value="<?=htmlspecialchars(@$account->data["user_addr2"])?>"
			class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'" style="width:230">
	</td>
</tr>
<tr>
	<td><span class="text">City:</td>
	<td><span class="textStd"><input type="Text" name="f_user_city" value="<?=htmlspecialchars(@$account->data["user_city"])?>"
			class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'" style="width:230">
	</td>
</tr>
<tr>
	<td><span class="text">State/Province:</td>
	<td><span class="textStd"><input type="Text" name="f_user_state" value="<?=htmlspecialchars(@$account->data["user_state"])?>"
			class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'" style="width:230">
	</td>
</tr>
<tr>
	<td><span class="text">Zip/Postal Code:</td>
	<td><span class="textStd"><input type="Text" name="f_user_zip" value="<?=htmlspecialchars(@$account->data["user_zip"])?>"
			class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'" style="width:230">
	</td>
</tr>
<tr>
	<td><span class="text">Phone:</td>
	<td><span class="textStd"><input type="Text" name="f_user_phone" value="<?=htmlspecialchars(@$account->data["user_phone"])?>"
			class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'" style="width:230">
	</td>
</tr>


<tr><td colspan="2">&nbsp;</td></tr>
<tr>
	<td colspan="2" class="tdH">Password (fill only to change password)</td>
</tr>
<tr>
	<td><span class="text">Old Password:</span></td>
	<td><span class="textStd"><input type="Password" name="f_password_old" value="<?=htmlspecialchars(@$f_password_old)?>" style="width:230" 
		class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'"></span></td>
</tr>
<tr>
	<td><span class="text">Password:</span></td>
	<td><span class="textStd"><input type="Password" name="f_password" value="<?=htmlspecialchars(@$f_password)?>" style="width:230" 
		class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'"></span></td>
</tr>
<tr>
	<td><span class="text">Re-enter Password:</span></td>
	<td><span class="textStd"><input type="Password" name="f_password2" value="<?=htmlspecialchars(@$f_password2)?>" style="width:230" 
		class="input2" onFocus="this.className='input2_act'" onBlur="this.className='input2'"></span></td>
</tr>


<tr><td colspan="2">&nbsp;</td></tr>
<tr>
    <td></td>
	<td><span class="textStd">
		<input type="Submit" value="Save" style="width: 150;" class="button2" onMouseOver="this.className='button2_act'" onMouseOut="this.className='button2'">
	</td>
</tr>
</table>
</form>

<?
include $r."_footer.php";
?>